package com.hducms.cms.entity.front;

import java.io.UnsupportedEncodingException;
import com.hducms.common.util.RSAUtils;

public class ResponseClient {
	
	/*
	 * 对消息体的签名
	 */
	String signature;
	/**
	 * 消息体
	 */
	String bodyString;
	private String privatekey="MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALtCfjsa7jPm HjKtSFzxzAe06Zb8/VzE8BMpElJCgyMhiyJEzC8nIB7PYEXuDLYQXbHvwpsg /ye0sshTkU+Q28n0f8/l0cXH7wbbxRIoArSqfN8+B6TvJGvyERoWCt/aXKGV R9ujaal8Rh+eIXVqBlF+TKBQFazeTKjwVoGvJElLAgMBAAECgYBu0uFmFYAY Ev6YO1lyOF/px7Xe+AbyWlNC47HGITr/FaEEPPciiONHmK9/c2zuay0oW58u tA6N7zFHwb1j+3U3Q1KOj3uZ6GwbK6kL1zTJZBWD/93+0wZg5Y5nt6/pNfOI nTkD9HRPVgyt8CBmDWoO4o1EDPhLxJB4tq7hqUQLIQJBAOA8Eq+GvvavzNg9 en7gzoLdoFKHMPsRFGoncIAkMrN2PjHFrtfL4Cdz12p7FSOGCIxnif/QjOrI wUC855VLPgkCQQDVyYPhpkYCOKRmN1laG/fPvUo15o4pxI+e8HPON6tpDoBR y7Hcf4uQK9/21RQpZ/sH3Bfy6a3aOKPGM8G6cuGzAkBrl6eHnWoHx/bMU0Nx mcC9PkZtEv1Hmrxm6yGp+rRxM+1HyIjKdsLJa2YTa5eLAgccB5pJqvHSvh0s SPf9xKqxAkEA0Ixa7XWhF6ufm+LkdAWScYFq8jeteMs5e0d/AKzHtp0hyikV oU5+m65hNU1Y9Kdtd5ZZempAYP8drExy8Gn/BwJBAM2ILbGMTPDrCh3EjhtE ATSgfZ4MKzvqTEutDVKD84Q5ffvM0e+4fDPFWCyZ/qugfw49mIRTphCkYmCq V0RYbFA=";
	private String publickey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7Qn47Gu4z5h4yrUhc8cwH tOmW/P1cxPATKRJSQoMjIYsiRMwvJyAez2BF7gy2EF2x78KbIP8ntLLIU5FP kNvJ9H/P5dHFx+8G28USKAK0qnzfPgek7yRr8hEaFgrf2lyhlUfbo2mpfEYf niF1agZRfkygUBWs3kyo8FaBryRJSwIDAQAB";

	public String getSignature() {
		return signature;
	}

	public void setSignature(String data) {
		try {
			this.signature = RSAUtils.encryptToStringByPrivateKey(data.getBytes("UTF-8"),
					getPrivatekey());
		} catch (UnsupportedEncodingException e) {
			System.out.println("加密失败");
			this.signature=null;
		} catch (Exception e) {
			System.out.println("加密失败");
			this.signature=null;
		}
	}
	public String getBodyString() {
		return bodyString;
	}

	public void setBodyString(String bodyString) {
		this.bodyString = bodyString;
	}

	public String getPrivatekey() {
		return privatekey;
	}

	public void setPrivatekey(String privatekey) {
		this.privatekey = privatekey;
	}

	public String getPublickey() {
		return publickey;
	}

	public void setPublickey(String publickey) {
		this.publickey = publickey;
	}
	
}
